$(document).ready(function() {
	showLoading();
	$('title', parent.document).html($('title').text());
	setBaseUrl();
	addTitle("batteryTypeSave");
	searchBatteryType();
})

function searchBatteryType(){
	createComBody("detailOneBody", batteryTypeTable, undefined, 1);
	createComBody("detailTwoBody", batteryTypeTable, undefined, 2);
	selectDate("batteryDateDate");
	setTimeout(hideLoading, 500);
}
function saveBatteryType(data){
	     var result = data && data.result;
	     if (result == "Success") {
	    	 showMessge(messageContent["Insert.Success"], undefined, goback);
	     } else if (result == "NotFound"){
	    	 showMessge(messageContent["Insert.Failed"]);
	     } else if (result == "UserIDNoNull"){
	         showMessge(messageContent["UserIDNoNull"]);
	     } else {
	    	 showMessge(messageContent["Insert.Error"]);
	     }
}
function confirm(){
	return checkForm("saveForm", batteryTypeTable);
}
function goback() {
	window.parent.skipMenu('vehicle/batteryType', 'drownDown3', '', 'carPage', 'batteryType');
}